import java.util.Arrays;
import java.util.Scanner;

public class Java315 {



    public static void main(String[] args) {

        int [] array = new  int[5];
        Scanner scanner = new Scanner(System.in);
        for (int i = 0; i < array.length; i++) {
            array[i] = scanner.nextInt();
        }
        int ret = search2(array);
        if(ret != 0) {
            System.out.println(ret);
        }else {
            System.out.println("没有只出现一次的数字");
        }
    }

    public static int search2(int [] a){

        int flag = a[0];
        for (int i = 1; i < a.length; i++) {
           flag = flag ^ a[i];
        }
        return flag;
    }




    public static void main6(String[] args) {
        String se = "132456";
        for (int i = 0; i < se.length(); i++) {
            char ch = se.charAt(i);
            System.out.print(ch+" ");
        }
        int [] array = {1,2,3,4,5,6,7,8,9};
        System.out.println(Arrays.toString(array));
    }


    public static void main5(String[] args) {
        int [] array = {2,1,3,2};
        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        count(array,a);
    }
    public static void count(int [] a,int total){

        for (int i = 0; i < a.length; i++) {
            for (int j = i + 1; j < a.length ; j++) {
               /* if(a[i] + a[j] == total ){
                    System.out.print("["+i+","+j+"]");
                }*/
            int flag = 0;
                if(a[i] == a[j]){
                    continue;
                }else {
                    if(a[i] + a[j] == total ){
                        System.out.print("["+i+","+j+"]");
                        flag++;
                        break;
                    }
                }
                if(flag == 1){
                    return;
                }
            }

        }

    }


    public static void main3(String[] args) {
        int [] array = {7,5,8,6,1,2,4,9,10,3};
        bubbleSort(array);
        for (int i = 0; i < array.length; i++) {
            System.out.print(array[i]+" ");
        }
    }
    public static void bubbleSort(int [] a){
        for (int i = 0; i < a.length - 1; i++) {
            int flag = 0;
            for (int j = 0; j < a.length - 1 - i; j++) {
                if(a[j] > a[j+1]){
                    int tem = a[j];
                    a[j] = a[j+1];
                    a[j+1] = tem;
                    flag++;
                }
                if(flag == 0){
                    continue;
                }
            }
        }
    }
    
    public static void main2(String[] args) {
        int [] array = {1,3,5,7,9,11,15,18,75,99};//10
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int ret = myBinSearch(array,n);
        if(ret == 0){
            System.out.println("你所查找数字不存在");
        }else{
            System.out.println("你所求数字下标为"+ret);
        }
    }

    public static  int myBinSearch(int [] a,int n){
        int left = 0;
        int right = a.length-1;
        while(left <= right){
            int mid = (left + right) / 2;
            if(a[mid] > n){
                right = mid - 1;
            }else if(a[mid] < n){
                left = mid + 1;
            }else {
                return mid;
            }
        }
        return 0;
    }

    public static void main1(String[] args) {
        int [] array = {1,2,3,4,5,6};
        for (int x: array){
            System.out.print(x+" ");
        }
        System.out.println("\n====================");
        sortOdd(array);
        for (int x: array){
            System.out.print(x+" ");
        }
    }
    public static void sortOdd(int [] a){
        int start = 0;
        int end = a.length-1;
        int i = a.length/2;
        while (i != 0){
            if(a[start] % 2 ==0 ){
                int tem = a[start];
               a[start] = a[end];
                a[end] = tem;

            }
            start++;
            end--;
            i--;
        }
    }
}
